package com.yuju.enums;
/**
 * 
 * 类名：VerificationCodeReturnCodeEnum  <br />
 *
 * 功能：验证码相关
 *
 * @author : zhousc <br />
 * @Date : 2018年1月8日 上午10:27:38  <br />
 * @version : 1.1 <br />
 */
public enum VerificationCodeReturnCodeEnum {
	SMS_SEND_SUCCESS("yuju-verificationCode-1000", "验证码发送成功"),
	SMS_SEND_FAILURE("yuju-verificationCode-1001", "验证码发送失败"),
	SMS_SEND_ALREADY_SUCCESS("yuju-verificationCode-1002", "验证码已发送");
	
	private String code;
	private String desc;
	
	VerificationCodeReturnCodeEnum(String code, String desc) {
		this.code = code;
		this.desc = desc;
	}
	
	public static String getDescByCode(String code) {
		for (VerificationCodeReturnCodeEnum enume : VerificationCodeReturnCodeEnum.values()) {
			if (enume.getCode().equals(code)) {
				return enume.getDesc();
			}
		}
		
		return "未知枚举类型";
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getDesc() {
		return desc;
	}

	public void setDesc(String desc) {
		this.desc = desc;
	}
}